Skip to content

schema, refactor: rename cloud.user_vm_details to cloud.vm_instance_details #10736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

shwstppr
Copy link
Contributor

Description

Fixes #9975
Renames cloud.user_vm_details to cloud.vm_instance_details to allow adding details for different types on VMs

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 3.89%. Comparing base (666784f) to head (821a5e7).

❗ There is a different number of reports uploaded between BASE (666784f) and HEAD (821a5e7). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (666784f) HEAD (821a5e7)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #10736       +/-   ##
=============================================
- Coverage     16.74%    3.89%   -12.86%     
=============================================
  Files          5724      417     -5307     
  Lines        507785    33971   -473814     
  Branches      61732     6095    -55637     
=============================================
- Hits          85052     1324    -83728     
+ Misses       413251    32489   -380762     
+ Partials       9482      158     -9324     
Flag Coverage Δ
uitests 3.89% <ø> (ø)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shwstppr shwstppr force-pushed the rename-uservmdetail-vminstancedetail branch from 02bee47 to e392611 Compare April 16, 2025 10:35
@shwstppr shwstppr force-pushed the rename-uservmdetail-vminstancedetail branch from e392611 to 2f4c7a2 Compare April 16, 2025 11:16
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13080

@DaanHoogland
Copy link
Contributor

thanks for this @shwstppr

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13029)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 56454 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13029-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_zones_metrics Error 0.21 test_metrics_api.py

@shwstppr
Copy link
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link

@shwstppr a [SL] Trillian-Jenkins matrix job (EL8 mgmt + EL8 KVM, Ubuntu22 mgmt + Ubuntu22 KVM, EL8 mgmt + VMware 7.0u3, EL9 mgmt + XCP-ng 8.2 ) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13064)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 57777 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13064-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_zones_metrics Error 0.19 test_metrics_api.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-13065)
Environment: kvm-ubuntu22 (x2), Advanced Networking with Mgmt server u22
Total time taken: 59640 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13065-kvm-ubuntu22.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_zones_metrics Error 0.22 test_metrics_api.py
test_oobm_multiple_mgmt_server_ownership Failure 31.84 test_outofbandmanagement.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-13066)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 72391 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13066-vmware-70u3.zip
Smoke tests completed. 133 look OK, 8 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 342.84 test_events_resource.py
test_3d_gpu_support Error 284.06 test_deploy_vgpu_enabled_vm.py
test_list_vms_metrics_admin Error 3621.94 test_metrics_api.py
test_list_vms_metrics_history Error 5.79 test_metrics_api.py
test_list_volumes_metrics_history Error 3616.02 test_metrics_api.py
test_list_zones_metrics Error 0.23 test_metrics_api.py
test_01_prepare_and_cancel_maintenance Error 0.15 test_ms_maintenance_and_safe_shutdown.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 127.04 test_network_permissions.py
test_01_deployVMInSharedNetwork Failure 7.59 test_network.py
ContextSuite context=TestSharedNetworkWithConfigDrive>:teardown Error 8.68 test_network.py
test_02_restore_vm_with_disk_offering Error 55.11 test_restore_vm.py
test_03_restore_vm_with_disk_offering_custom_size Error 58.22 test_restore_vm.py
test_02_restore_vm_strict_tags_failure Error 60.45 test_vm_strict_host_tags.py

@blueorangutan
Copy link

[SF] Trillian test result (tid-13067)
Environment: xcpng82 (x2), Advanced Networking with Mgmt server ol9
Total time taken: 77554 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13067-xcpng82.zip
Smoke tests completed. 134 look OK, 7 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py
test_list_zones_metrics Error 0.21 test_metrics_api.py
test_01_prepare_and_cancel_maintenance Error 0.15 test_ms_maintenance_and_safe_shutdown.py
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 7.44 test_network.py
test_01_non_strict_host_anti_affinity Error 231.12 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 118.38 test_nonstrict_affinity_group.py
test_02_create_volume Error 3.24 test_resource_names.py
test_05_scale_vm_dont_allow_disk_offering_change Failure 66.53 test_scale_vm.py

@shwstppr shwstppr marked this pull request as ready for review April 21, 2025 07:10
@@ -27,7 +27,7 @@
raise RuntimeError("python setuptools is required to build Marvin")


VERSION = "4.21.0.0-SNAPSHOT"
VERSION = "4.21.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don’t think we want to merge this bit, yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 14169

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland
Copy link
Contributor

@shwstppr can you look at the conflicts?
@sureshanaparti can we try to get this in?

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm (upgrade tests needed)

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames the database table and related code from cloud.user_vm_details to cloud.vm_instance_details to support storing details for different types of VMs, not just user VMs. This is a schema refactoring that enhances flexibility by allowing VM details storage for all VM types.

Reviewed Changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Schema migration file Adds SQL migration to rename database table from user_vm_details to vm_instance_details
DAO classes Renames UserVmDetailsDao to VMInstanceDetailsDao and updates implementation
VO classes Renames UserVmDetailVO to VMInstanceDetailVO and updates table mapping
Test files Updates all test references to use new class names
Service implementations Updates all service layer code to use renamed DAO and VO classes
Database view Updates SQL view to reference new table name
Spring configuration Updates bean definitions to use new class names
Comments suppressed due to low confidence (1)

server/src/test/resources/createNetworkOffering.xml:53

  • The bean id 'UservmDetailsDaoImpl' is inconsistent with the new class name 'VMInstanceDetailsDaoImpl'. The bean id should be updated to match the new naming convention, such as 'vmInstanceDetailsDaoImpl'.
    <bean id="UservmDetailsDaoImpl" class="com.cloud.vm.dao.VMInstanceDetailsDaoImpl" />

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14270

@sureshanaparti
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13830)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 53530 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10736-t13830-kvm-ol8.zip
Smoke tests completed. 141 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_zones_metrics Error 0.20 test_metrics_api.py

Copy link
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same boat as @DaanHoogland and @sureshanaparti , CLGTM, but needs testing.

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@DaanHoogland DaanHoogland self-assigned this Jul 23, 2025
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 14311

@DaanHoogland
Copy link
Contributor

running upgrade tests ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

align systemvm details and user vm detail in a more intuitive way
5 participants